import { useRef } from "react"
import { Canvas, useFrame } from "react-three-fiber"

function Index() {
  const mesh = useRef()
  useFrame(()=>{
    mesh.current.rotation.y +=0.1
  })
  return (
    <div style={{ width: "100%", height: "100%" }}>
      <Canvas>
        <group position={[0, 0, 0]}>
          <mesh ref={mesh}>
            <boxGeometry args={[1, 1, 1]} />
            <meshStandardMaterial color="blue" />
          </mesh>
        </group>
      </Canvas>
    </div>
  )
}

export default Index
